﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BNSharp.BattleNet;
using System.Windows.Forms;
using BNSharp;

namespace Reticle.Core
{
    public interface IHost
    {
        //event PluginAddChat EventPluginAddChat;
        /// <summary>
        /// Adds a command in the command dictionary.
        /// </summary>
        /// <param name="CommandName">The name of the command.</param>
        /// <param name="CommandCallBack">The method that handles the command.</param>
        //void AddCommand(string CommandName, DBFlags flags, ParseCommand CommandCallBack);
        /// <summary>
        /// Removes a command from the command dictionary.
        /// </summary>
        /// <param name="CommandName">The name of the command to remove.</param>
        //void RemoveCommand(string CommandName);
        /// <summary>
        /// Formats the username based off the settings of the current profile.
        /// </summary>
        /// <param name="username">The username to format.</param>
        /// <param name="typ">The way you would like it formatted.</param>
        /// <returns>The formatted username.</returns>
        //string FormatUsername(string username, FormatUserNameType typ);
        /// <summary>
        /// Pass a form to the bot for the bot to display.
        /// </summary>
        /// <param name="frm"></param>
        void ShowForm(object frm);
        /// <summary>
        /// Gets the bots current version
        /// </summary>
        /// <returns>The version of the bot.</returns>
        object GetVersion();
        /// <summary>
        /// Gets whether the bot is connected
        /// </summary>
        /// <returns>Connection status of the bot.</returns>
        bool IsConnected();
        /// <summary>
        /// Gets the channel the bot is currently residing in
        /// </summary>
        /// <returns>The current channel.</returns>
        string CurrentChannel();
        /// <summary>
        /// Saves a setting in the profile's config.
        /// </summary>
        /// <param name="variablename">The name of the variable.</param>
        /// <param name="variable">The value of the variable.</param>
        void SaveConfigSetting(string variablename, object variable);
        /// <summary>
        /// Gets a setting from the profile's plugin file.
        /// </summary>
        /// <param name="variablename">The variable name.</param>
        /// <returns>The value of the variable.</returns>
        object GetPluginSetting(string variablename);
        /// <summary>
        /// Saves a setting in the profile's plugin file.
        /// </summary>
        /// <param name="variablename">The name of the variable.</param>
        /// <param name="variable">The value of the variable.</param>
        void SavePluginSetting(string variablename, object variable);
        /// <summary>
        /// Gets a setting from the profile's config.
        /// </summary>
        /// <param name="variablename">The variable name.</param>
        /// <returns>The value of the variable.</returns>
        object GetConfigSetting(string variablename);
        /// <summary>
        /// Will unload the current profile the plugin is loaded on.
        /// </summary>
        //void UnloadProfile();
        /// <summary>
        /// Will add the plugins menu to the profile menu area for it.
        /// </summary>
        /// <param name="menu">The menu structure to be added.</param>
        void SetPluginMenu(ToolStripMenuItem menu);
        /// <summary>
        /// Removes the plugin menu.
        /// </summary>
        //void RemovePluginMenu(ToolStripMenuItem menu);
        /// <summary>
        /// Adds the chat to the profile's tab that the plugin is loaded on.
        /// </summary>
        /// <param name="chatColor">The color you want the text to be. hexadecimal or static color</param>
        /// <param name="msg">The text you wish to add.</param>
        void AddChat(string color, string message);
        /// <summary>
        /// Sends the message to Battle.net
        /// </summary>
        /// <param name="msg">The text you wish to add.</param>
        void Send(string message);
        /// <summary>
        /// Allows the plugin to unload itself.
        /// </summary>
        void UnloadPlugin();
        /// <summary>
        /// The BattleNetClient which allows you to do just about everything connection wise.
        /// </summary>
        BattleNetClient Client
        {
            get;
            set;
        }
        /// <summary>
        /// The access database list.
        /// </summary>
        /*UserDatabaseList UserDatabase
        {
            get;
            set;
        }*/
        /// <summary>
        /// The bot profiles command dictionary, remember commands are stored in all upper case letters so it is impossible to add the same command twice.
        /// </summary>
        /*Dictionary<string, ParseCommand> CommandDictionary
        {
            get;
        }*/
        /// <summary>
        /// The bot profiles command access dictionary, remember commands are stored in all upper case letters so it is impossible to add the same command twice.
        /// </summary>
        /*Dictionary<string, DBFlags> CommandFlags
        {
            get;
        }*/
        /// <summary>
        /// Opens the profile config window to the selected profile.
        /// </summary>
        //void ShowProfileConfigWindow();

        //TabPage AddListView(string name, ucListView lstView);

        //void RemoveListView(TabPage tp);
    }
}
